+2001-09-08 Havoc Pennington <hp@pobox.com>
+
+ * gtk/gtkalignment.c (gtk_alignment_class_init): default
+ xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
+
+ * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew
+
+ * gtk/gtktextiter.c: fix docs
+ (gtk_text_iter_spew): get rid of this
+
+ * gtk/gtklayout.c: docs
+
+ * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
+ to center image and label together, instead of having image on
+ left and label centered, patch/suggestion from Jacob
+
+ * gtk/gtkdialog.c: docs
+
Sat Sep 8 14:19:49 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c: Write documentation
+2001-09-08 Havoc Pennington <hp@pobox.com>
+
+ * gtk/gtkalignment.c (gtk_alignment_class_init): default
+ xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
+
+ * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew
+
+ * gtk/gtktextiter.c: fix docs
+ (gtk_text_iter_spew): get rid of this
+
+ * gtk/gtklayout.c: docs
+
+ * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
+ to center image and label together, instead of having image on
+ left and label centered, patch/suggestion from Jacob
+
+ * gtk/gtkdialog.c: docs
+
Sat Sep 8 14:19:49 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c: Write documentation
+2001-09-08 Havoc Pennington <hp@pobox.com>
+
+ * gtk/gtkalignment.c (gtk_alignment_class_init): default
+ xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
+
+ * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew
+
+ * gtk/gtktextiter.c: fix docs
+ (gtk_text_iter_spew): get rid of this
+
+ * gtk/gtklayout.c: docs
+
+ * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
+ to center image and label together, instead of having image on
+ left and label centered, patch/suggestion from Jacob
+
+ * gtk/gtkdialog.c: docs
+
Sat Sep 8 14:19:49 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c: Write documentation
+2001-09-08 Havoc Pennington <hp@pobox.com>
+
+ * gtk/gtkalignment.c (gtk_alignment_class_init): default
+ xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
+
+ * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew
+
+ * gtk/gtktextiter.c: fix docs
+ (gtk_text_iter_spew): get rid of this
+
+ * gtk/gtklayout.c: docs
+
+ * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
+ to center image and label together, instead of having image on
+ left and label centered, patch/suggestion from Jacob
+
+ * gtk/gtkdialog.c: docs
+
Sat Sep 8 14:19:49 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c: Write documentation
+2001-09-08 Havoc Pennington <hp@pobox.com>
+
+ * gtk/gtkalignment.c (gtk_alignment_class_init): default
+ xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
+
+ * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew
+
+ * gtk/gtktextiter.c: fix docs
+ (gtk_text_iter_spew): get rid of this
+
+ * gtk/gtklayout.c: docs
+
+ * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
+ to center image and label together, instead of having image on
+ left and label centered, patch/suggestion from Jacob
+
+ * gtk/gtkdialog.c: docs
+
Sat Sep 8 14:19:49 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c: Write documentation
+2001-09-08 Havoc Pennington <hp@pobox.com>
+
+ * gtk/gtkalignment.c (gtk_alignment_class_init): default
+ xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
+
+ * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew
+
+ * gtk/gtktextiter.c: fix docs
+ (gtk_text_iter_spew): get rid of this
+
+ * gtk/gtklayout.c: docs
+
+ * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
+ to center image and label together, instead of having image on
+ left and label centered, patch/suggestion from Jacob
+
+ * gtk/gtkdialog.c: docs
+
Sat Sep 8 14:19:49 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c: Write documentation
+2001-09-08 Havoc Pennington <hp@pobox.com>
+
+ * gtk/gtkalignment.c (gtk_alignment_class_init): default
+ xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
+
+ * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew
+
+ * gtk/gtktextiter.c: fix docs
+ (gtk_text_iter_spew): get rid of this
+
+ * gtk/gtklayout.c: docs
+
+ * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
+ to center image and label together, instead of having image on
+ left and label centered, patch/suggestion from Jacob
+
+ * gtk/gtkdialog.c: docs
+
Sat Sep 8 14:19:49 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c: Write documentation
+2001-09-08 Havoc Pennington <hp@pobox.com>
+
+ * gtk/tmpl/gtklayout.sgml: docs
+
+ * gdk-pixbuf/gdk-pixbuf.sgml: remove the section on compiling
+ gdk-pixbuf since it isn't a standalone package anymore
+
+ * gtk/building.sgml: section on compiling GTK itself
+
2001-09-08 Havoc Pennington <hp@pobox.com>
* gtk/gtk-sections.txt: put GtkPacker back in here so it won't be
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
content_files = \
- compiling.sgml \
gdk-pixbuf.sgml \
porting-from-imlib.sgml
+++ /dev/null
- <appendix id="compiling">
- <title>Compiling the &gdk-pixbuf; library</title>
-
- <para>
- This appendix describes the special options you can use while
- compiling the &gdk-pixbuf; library.
- </para>
-
- <sect1 id="building">
- <title>Building the Library</title>
- <para>
- The &gdk-pixbuf; library uses the standard GNU build system,
- using <application>autoconf</application> for package
- configuration and resolving portability issues,
- <application>automake</application> for building makefiles
- that comply with the GNU Coding Standards, and
- <application>libtool</application> for building shared
- libraries on multiple platforms. The normal sequence for
- compiling and installing the &gdk-pixbuf; library is thus:
-
- <literallayout>
- <userinput>./configure</userinput>
- <userinput>make</userinput>
- <userinput>make install</userinput>
- </literallayout>
- </para>
-
- <para>
- The standard options provided by <application>GNU
- autoconf</application> may be passed to the
- <command>configure</command> script. Please see the
- <application>autoconf</application> documentation or run
- <command>./configure --help</command> for information about
- the standard options.
- </para>
- </sect1>
-
- <sect1 id="extra-configuration-options">
- <title>Extra Configuration Options</title>
-
- <para>
- In addition to the normal options, the
- <command>configure</command> script in the &gdk-pixbuf;
- library supports these additional arguments:
-
- <cmdsynopsis>
- <command>configure</command>
-
- <group>
- <arg>--disable-modules</arg>
- <arg>--enable-modules</arg>
- </group>
-
- <group>
- <arg>--disable-gtk-doc</arg>
- <arg>--enable-gtk-doc</arg>
- </group>
- </cmdsynopsis>
- </para>
-
- <formalpara>
- <title><systemitem>--disable-modules</systemitem> and
- <systemitem>--enable-modules</systemitem></title>
-
- <para>
- Normally &gdk-pixbuf; will try to build the image file
- format loaders as little shared libraries that are loaded on
- demand. The <systemitem>--disable-modules</systemitem>
- argument indicates that they should all be built statically
- into the &gdk-pixbuf; library instead. This is useful for
- people who need to produce statically-linked binaries. If
- neither <systemitem>--disable-modules</systemitem> nor
- <systemitem>--enable-modules</systemitem> is specified, then
- the <command>configure</command> script will try to
- auto-detect whether shared modules work on your system.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-gtk-doc</systemitem> and
- <systemitem>--enable-gtk-doc</systemitem></title>
-
- <para>
- By default the <command>configure</command> script will try
- to auto-detect whether the
- <application>gtk-doc</application> package is installed. If
- it is, then it will use it to extract and build the
- documentation for the &gdk-pixbuf; library. These options
- can be used to explicitly control whether gtk-doc should be
- used or not. If it is not used, the distributed,
- pre-generated HTML files will be installed instead of
- building them on your machine.
- </para>
- </formalpara>
- </sect1>
- </appendix>
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("gdk-pixbuf.sgml" "book" "book" "")
-End:
--->
<!entity gdk-pixbuf-gdk-pixbuf-xlib-rgb SYSTEM "sgml/gdk-pixbuf-xlib-rgb.sgml">
<!entity Porting-From-Imlib SYSTEM "porting-from-imlib.sgml">
-<!entity Compiling SYSTEM "compiling.sgml">
<!entity gdk-pixbuf "<application>gdk-pixbuf</application>">
<!entity Imlib "<application>Imlib</application>">
</reference>
&Porting-From-Imlib;
- &Compiling;
<!-- License -->
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
+ building.sgml \
compiling.sgml \
framebuffer.sgml \
objects_grouped.sgml \
+ resources.sgml \
text_widget.sgml \
tree_widget.sgml
--- /dev/null
+<refentry id="gtk-building" revision="6 Sept 2001">
+<refmeta>
+<refentrytitle>Compiling the GTK+ package</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>GTK Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Compiling the GTK+ Package</refname>
+<refpurpose>
+How to compile GTK+ itself
+</refpurpose>
+</refnamediv>
+
+ <refsect1 id="building">
+ <title>Building the Library on UNIX</title>
+ <para>
+ On UNIX, GTK+ uses the standard GNU build system,
+ using <application>autoconf</application> for package
+ configuration and resolving portability issues,
+ <application>automake</application> for building makefiles
+ that comply with the GNU Coding Standards, and
+ <application>libtool</application> for building shared
+ libraries on multiple platforms. The normal sequence for
+ compiling and installing the GTK+ library is thus:
+
+ <literallayout>
+ <userinput>./configure</userinput>
+ <userinput>make</userinput>
+ <userinput>make install</userinput>
+ </literallayout>
+ </para>
+
+ <para>
+ The standard options provided by <application>GNU
+ autoconf</application> may be passed to the
+ <command>configure</command> script. Please see the
+ <application>autoconf</application> documentation or run
+ <command>./configure --help</command> for information about
+ the standard options.
+ </para>
+ </refsect1>
+
+ <refsect1 id="extra-configuration-options">
+ <title>Extra Configuration Options</title>
+
+ <para>
+ In addition to the normal options, the
+ <command>configure</command> script in the GTK+
+ library supports these additional arguments:
+
+ <cmdsynopsis>
+ <command>configure</command>
+
+ <group>
+ <arg>--disable-modules</arg>
+ <arg>--enable-modules</arg>
+ </group>
+ <group>
+ <arg>--with-included-loaders==LOADER1,LOADER2,...</arg>
+ </group>
+ <group>
+ <arg>--disable-gtk-doc</arg>
+ <arg>--enable-gtk-doc</arg>
+ </group>
+ <group>
+ <arg>--with-gdktarget=[x11|linux-fb]</arg>
+ </group>
+ <group>
+ <arg>--disable-shadowfb</arg>
+ <arg>--enable-shadowfb</arg>
+ </group>
+ </cmdsynopsis>
+ </para>
+
+ <formalpara>
+ <title><systemitem>--disable-modules</systemitem> and
+ <systemitem>--enable-modules</systemitem></title>
+
+ <para>
+ Normally GTK+ will try to build the GdkPixbuf image file
+ format loaders as little shared libraries that are loaded on
+ demand. The <systemitem>--disable-modules</systemitem>
+ argument indicates that they should all be built statically
+ into the GTK+ library instead. This is useful for
+ people who need to produce statically-linked binaries. If
+ neither <systemitem>--disable-modules</systemitem> nor
+ <systemitem>--enable-modules</systemitem> is specified, then
+ the <command>configure</command> script will try to
+ auto-detect whether shared modules work on your system.
+ </para>
+ </formalpara>
+
+ <formalpara>
+ <title><systemitem>--with-included-loaders</systemitem></title>
+
+ <para>
+ This option allows you to specify which image loaders you
+ want to include; for example, you might include only the PNG
+ loader to create a smaller GdkPixbuf binary.
+ </para>
+ </formalpara>
+
+ <formalpara>
+ <title><systemitem>--disable-gtk-doc</systemitem> and
+ <systemitem>--enable-gtk-doc</systemitem></title>
+
+ <para>
+ By default the <command>configure</command> script will try
+ to auto-detect whether the
+ <application>gtk-doc</application> package is installed. If
+ it is, then it will use it to extract and build the
+ documentation for the GTK+ library. These options
+ can be used to explicitly control whether gtk-doc should be
+ used or not. If it is not used, the distributed,
+ pre-generated HTML files will be installed instead of
+ building them on your machine.
+ </para>
+ </formalpara>
+
+ <formalpara>
+ <title><systemitem>--with-gdktarget</systemitem></title>
+
+ <para>
+ Toggles between the x11 and linux-fb backends for GDK.
+ The default is x11.
+ </para>
+ </formalpara>
+
+ <formalpara>
+ <title><systemitem>--disable-shadowfb</systemitem> and
+ <systemitem>--enable-shadowfb</systemitem></title>
+
+ <para>
+ Toggles shadow framebuffer support for the linux-fb target,
+ if selected.
+ </para>
+ </formalpara>
+
+ </refsect1>
+
+</refentry>
<!entity gtk-TextWidget SYSTEM "text_widget.sgml">
<!entity gtk-TreeWidget SYSTEM "tree_widget.sgml">
<!entity gtk-Compiling SYSTEM "compiling.sgml">
+<!entity gtk-Building SYSTEM "building.sgml">
<!entity gtk-Resources SYSTEM "resources.sgml">
<!entity gtk-Windows SYSTEM "windows.sgml">
<!entity gtk-Framebuffer SYSTEM "framebuffer.sgml">
</variablelist>
</para>
+ >k-Building;
>k-Compiling;
>k-Resources;
>k-Windows;
gtk_text_iter_compare
gtk_text_iter_in_range
gtk_text_iter_order
-gtk_text_iter_spew
</SECTION>
<SECTION>
@show_toggle_indicator: unused
@show_submenu_indicator: whether to show the arrow or not
-<!-- ##### MACRO gtk_notebook_set_page ##### -->
-<para>
-</para>
-
-@notebook:
-@page_num:
-
<!-- ##### FUNCTION gtk_object_arg_get ##### -->
<para>
Private function to get an argument and argument info from an object.
@first:
@second:
+<!-- ##### FUNCTION gtk_text_iter_spew ##### -->
+<para>
+
+</para>
+
+@iter:
+@desc:
+
<!-- ##### FUNCTION gtk_text_view_set_text_window_size ##### -->
<para>
A horizontal scrollbar
<!-- ##### SECTION Long_Description ##### -->
+
<para>
-The HScrollbar widget is a widget arranged horizontally creating a scroll
-bar. See #GtkScrollbar for details on scrollbars. #GtkAdjustment pointers may be
-added to handle the adjustment of the scrollbars or it may be left NULL in which
-case one will be created you. See #GtkAdjustment for details.
+The HScrollbar widget is a widget arranged horizontally creating a
+scroll bar. See #GtkScrollbar for details on
+scrollbars. #GtkAdjustment pointers may be added to handle the
+adjustment of the scrollbars or it may be left NULL in which case one
+will be created you. See #GtkAdjustment for details.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
-
+#GtkScrollbar, #GtkScrolledWindow
</para>
<!-- ##### STRUCT GtkHScrollbar ##### -->
<!-- ##### SECTION Short_Description ##### -->
+Infinite scrollable area containing child widgets and/or custom drawing
<!-- ##### SECTION Long_Description ##### -->
<para>
+#GtkLayout is similar to #GtkDrawingArea in that it's a "blank slate"
+and doesn't do anything but paint a blank background by default. It's
+different in that it supports scrolling natively (you can add it to a
+#GtkScrolledWindow), and it can contain child widgets, since it's a
+#GtkContainer. However if you're just going to draw, a #GtkDrawingArea
+is a better choice since it has lower overhead.
+</para>
+<para>
+When handling expose events on a #GtkLayout, you must draw to
+GTK_LAYOUT (layout)->bin_window, rather than to
+GTK_WIDGET (layout)->window, as you would for a drawing
+area.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
-
+#GtkDrawingArea, #GtkScrolledWindow
</para>
<!-- ##### STRUCT GtkLayout ##### -->
</para>
+@bin_window:
<!-- ##### FUNCTION gtk_layout_new ##### -->
<para>
</para>
@layout:
-@widget:
+@child_widget:
@x:
@y:
+<!-- # Unused Parameters # -->
+@widget:
<!-- ##### FUNCTION gtk_layout_move ##### -->
</para>
@layout:
-@widget:
+@child_widget:
@x:
@y:
+<!-- # Unused Parameters # -->
+@widget:
<!-- ##### FUNCTION gtk_layout_set_size ##### -->
<!-- ##### ARG GtkLayout:hadjustment ##### -->
<para>
-
+Horizontal scroll adjustment, see gtk_layout_set_hadjustment()
</para>
<!-- ##### ARG GtkLayout:vadjustment ##### -->
<para>
-
+Vertical scroll adjustment, see gtk_layout_set_vadjustment()
</para>
<!-- ##### ARG GtkLayout:width ##### -->
<para>
-
+Layout width, see gtk_layout_set_size()
</para>
<!-- ##### ARG GtkLayout:height ##### -->
<para>
-
+Layout height, see gtk_layout_set_size()
</para>
@Returns:
+<!-- ##### MACRO gtk_notebook_set_page ##### -->
+<para>
+</para>
+
+<!-- # Unused Parameters # -->
+@notebook:
+@page_num:
+
+
<!-- ##### FUNCTION gtk_notebook_next_page ##### -->
<para>
</para>
#GtkRcStyle structures to form a #GtkStyle.
</para>
-@parent_instance:
@name:
@bg_pixmap_name:
@font_desc:
#GtkVScrollbar. It is not very useful in itself.
</para>
+<para>
+The position of the thumb in a scrollbar is controlled by the scroll
+adjustments. See #GtkAdjustment for the fields in an adjustment - for
+#GtkScrollbar, the "value" field represents the position of the
+scrollbar, which must be between the "lower" field and "upper -
+page_size." The "page_size" field represents the size of the visible
+scrollable area. The "step_increment" and "page_increment" fields are
+used when the user asks to step down (using the small stepper arrows)
+or page down (using for example the PageDown key).
+</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<listitem><para>a vertical scrollbar.</para></listitem>
</varlistentry>
+<varlistentry>
+<term>#GtkAdjustment</term>
+<listitem><para>connects scrollbars to the widget being scrolled.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term>#GtkScrolledWindow</term>
+<listitem><para>convenient widget for setting up scrolling.</para></listitem>
+</varlistentry>
+
</variablelist>
</para>
GtkScrolledWindow
<!-- ##### SECTION Short_Description ##### -->
-\r
+
Adds scrollbars to its child widget.
<!-- ##### SECTION Long_Description ##### -->
-<para>\r
-#GtkScrolledWindow is a #GtkBin subclass: it's a container \r
-the accepts a single child widget. #GtkScrolledWindow adds scrollbars\r
-to the child widget.\r
-</para>\r
-\r
-<para>\r
-The scrolled window can work in two ways. Some widgets have native\r
-scrolling support; these widgets have "slots" for #GtkAdjustment\r
-objects. The scrolled window installs #GtkAdjustment objects in the\r
-child window's slots using the set_scroll_adjustments_signal, found in\r
-#GtkWidgetClass. (Conceptually, these widgets implement a "Scrollable"\r
-interface; because GTK+ 1.2 lacks multiple inheritance, this interface\r
-is hackily implemented as a signal in #GtkWidgetClass.)\r
-</para>\r
-\r
-<para>\r
-The second way to use the scrolled window is useful with widgets that\r
-lack the set_scroll_adjustments_signal. The #GtkViewport widget acts as\r
-a proxy, implementing scrollability for child widgets that lack their\r
-own scrolling capabilities. \r
-</para>\r
-\r
-<para>\r
-If a widget has native scrolling abilities, it can be added to the\r
-#GtkScrolledWindow with gtk_container_add(). If a widget does not, you\r
-must first add the widget to a #GtkViewport, then add the GtkViewport\r
-to the scrolled window. The convenience function\r
-gtk_scrolled_window_add_with_viewport() does exactly this, so you can\r
-ignore the presence of the viewport.\r
+<para>
+#GtkScrolledWindow is a #GtkBin subclass: it's a container
+the accepts a single child widget. #GtkScrolledWindow adds scrollbars
+to the child widget and optionally draws a beveled frame around the
+child widget.
+</para>
+
+<para>
+The scrolled window can work in two ways. Some widgets have native
+scrolling support; these widgets have "slots" for #GtkAdjustment
+objects.
+<footnote><para>The scrolled window installs #GtkAdjustment objects in
+the child window's slots using the set_scroll_adjustments_signal,
+found in #GtkWidgetClass. (Conceptually, these widgets implement a
+"Scrollable" interface; because GTK+ 1.2 lacked interface support in
+the object system, this interface is hackily implemented as a signal
+in #GtkWidgetClass. The GTK+ 2.0 object system would allow a clean
+implementation, but it wasn't worth breaking the
+API.)</para></footnote>
+Widgets with native scroll support include #GtkTreeView, #GtkTextView,
+and #GtkLayout.
+</para>
+
+<para>
+For widgets that lack native scrolling support, the #GtkViewport
+widget acts as an adaptor class, implementing scrollability for child
+widgets that lack their own scrolling capabilities. Use #GtkViewport
+to scroll child widgets such as #GtkTable, #GtkBox, and so on.
+</para>
+
+<para>
+If a widget has native scrolling abilities, it can be added to the
+#GtkScrolledWindow with gtk_container_add(). If a widget does not, you
+must first add the widget to a #GtkViewport, then add the #GtkViewport
+to the scrolled window. The convenience function
+gtk_scrolled_window_add_with_viewport() does exactly this, so you can
+ignore the presence of the viewport.
+</para>
+
+<para>
+The position of the scrollbars is controlled by the scroll
+adjustments. See #GtkAdjustment for the fields in an adjustment - for
+#GtkScrollbar, used by #GtkScrolledWindow, the "value" field
+represents the position of the scrollbar, which must be between the
+"lower" field and "upper - page_size." The "page_size" field
+represents the size of the visible scrollable area. The
+"step_increment" and "page_increment" fields are used when the user
+asks to step down (using the small stepper arrows) or page down (using
+for example the PageDown key).
+</para>
+
+<para>
+If a #GtkScrolledWindow doesn't behave quite as you would like, or
+doesn't have exactly the right layout, it's very possible to set up
+your own scrolling with #GtkScrollbar and for example a #GtkTable.
</para>
<!-- ##### SECTION See_Also ##### -->
-<para>\r
-#GtkViewport, #GtkAdjustment, #GtkWidgetClass\r
+<para>
+#GtkViewport, #GtkAdjustment, #GtkWidgetClass
</para>
<!-- ##### STRUCT GtkScrolledWindow ##### -->
-<para>\r
-There are no public fields in the #GtkScrolledWindow struct; it should \r
-only be accessed using the functions below.\r
+<para>
+There are no public fields in the #GtkScrolledWindow struct; it should
+only be accessed using the functions below.
</para>
<!-- ##### FUNCTION gtk_scrolled_window_new ##### -->
-<para>\r
-Creates a new scrolled window. The two arguments are the scrolled\r
-window's adjustments; these will be shared with the scrollbars and the\r
-child widget to keep the bars in sync with the child. Usually you want\r
-to pass NULL for the adjustments, which will cause the scrolled window\r
-to create them for you.\r
+<para>
+Creates a new scrolled window. The two arguments are the scrolled
+window's adjustments; these will be shared with the scrollbars and the
+child widget to keep the bars in sync with the child. Usually you want
+to pass NULL for the adjustments, which will cause the scrolled window
+to create them for you.
</para>
@hadjustment: Horizontal adjustment.
<!-- ##### FUNCTION gtk_scrolled_window_get_hadjustment ##### -->
-<para>\r
-Returns the horizontal scrollbar's adjustment, used to connect the\r
-horizontal scrollbar to the child widget's horizontal scroll\r
-functionality.\r
+<para>
+Returns the horizontal scrollbar's adjustment, used to connect the
+horizontal scrollbar to the child widget's horizontal scroll
+functionality.
</para>
@scrolled_window: A #GtkScrolledWindow.
<!-- ##### FUNCTION gtk_scrolled_window_get_vadjustment ##### -->
-<para>\r
-Returns the vertical scrollbar's adjustment, used to connect the\r
-vertical scrollbar to the child widget's vertical scroll\r
-functionality.\r
+<para>
+Returns the vertical scrollbar's adjustment, used to connect the
+vertical scrollbar to the child widget's vertical scroll
+functionality.
</para>
@scrolled_window: A #GtkScrolledWindow.
<!-- ##### FUNCTION gtk_scrolled_window_set_policy ##### -->
-<para>\r
-Sets the scrollbar policy for the horizontal and vertical scrollbars. \r
-The policy determines when the scrollbar should appear; it is a value\r
-from the #GtkPolicyType enumeration. If %GTK_POLICY_ALWAYS, the\r
-scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is\r
-never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only\r
-if needed (that is, if the slider part of the bar would be smaller\r
-than the trough - the display is larger than the page size).\r
+<para>
+Sets the scrollbar policy for the horizontal and vertical scrollbars.
+The policy determines when the scrollbar should appear; it is a value
+from the #GtkPolicyType enumeration. If %GTK_POLICY_ALWAYS, the
+scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is
+never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only
+if needed (that is, if the slider part of the bar would be smaller
+than the trough - the display is larger than the page size).
</para>
@scrolled_window: A #GtkScrolledWindow.
<!-- ##### FUNCTION gtk_scrolled_window_add_with_viewport ##### -->
-<para>\r
-Used to add children without native scrolling capabilities. This is\r
-simply a convenience function; it is equivalent to adding the\r
-unscrollable child to a viewport, then adding the viewport to the\r
-scrolled window. If a child has native scrolling, use\r
-gtk_container_add() instead of this function.\r
-</para>\r
-\r
-<para>\r
-The viewport scrolls the child by moving its #GdkWindow, and takes the\r
-size of the child to be the size of its toplevel #GdkWindow. This will\r
-be very wrong for most widgets that support native scrolling; for\r
-example, if you add a #GtkCList with a viewport, the whole widget will\r
-scroll, including the column headings. Thus #GtkCList supports\r
-scrolling already, and should not be used with the #GtkViewport proxy.\r
-</para>\r
-\r
-<para>\r
-A widget supports scrolling natively if the\r
-set_scroll_adjustments_signal field in #GtkWidgetClass is non-zero,\r
-i.e. has been filled in with a valid signal identifier.\r
+<para>
+Used to add children without native scrolling capabilities. This is
+simply a convenience function; it is equivalent to adding the
+unscrollable child to a viewport, then adding the viewport to the
+scrolled window. If a child has native scrolling, use
+gtk_container_add() instead of this function.
+</para>
+
+<para>
+The viewport scrolls the child by moving its #GdkWindow, and takes the
+size of the child to be the size of its toplevel #GdkWindow. This will
+be very wrong for most widgets that support native scrolling; for
+example, if you add a #GtkCList with a viewport, the whole widget will
+scroll, including the column headings. Thus #GtkCList supports
+scrolling already, and should not be used with the #GtkViewport proxy.
+</para>
+
+<para>
+A widget supports scrolling natively if the
+set_scroll_adjustments_signal field in #GtkWidgetClass is non-zero,
+i.e. has been filled in with a valid signal identifier.
</para>
@scrolled_window: A #GtkScrolledWindow.
<!-- ##### FUNCTION gtk_scrolled_window_set_placement ##### -->
-<para>\r
-Determines the location of the child widget with respect to the\r
-scrollbars. The default is %GTK_CORNER_TOP_LEFT, meaning the child is\r
-in the top left, with the scrollbars underneath and to the right.\r
-Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT,\r
-%GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT.\r
+<para>
+Determines the location of the child widget with respect to the
+scrollbars. The default is %GTK_CORNER_TOP_LEFT, meaning the child is
+in the top left, with the scrollbars underneath and to the right.
+Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT,
+%GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT.
</para>
@scrolled_window: A #GtkScrolledWindow.
<!-- ##### FUNCTION gtk_scrolled_window_set_hadjustment ##### -->
-<para>\r
-Sets the #GtkAdjustment for the horizontal scrollbar.\r
+<para>
+Sets the #GtkAdjustment for the horizontal scrollbar.
</para>
@scrolled_window: A #GtkScrolledWindow.
<!-- ##### FUNCTION gtk_scrolled_window_set_vadjustment ##### -->
-<para>\r
-Sets the #GtkAdjustment for the vertical scrollbar.\r
+<para>
+Sets the #GtkAdjustment for the vertical scrollbar.
</para>
@scrolled_window: A #GtkScrolledWindow.
<!-- ##### ARG GtkScrolledWindow:hadjustment ##### -->
-<para>\r
-Horizontal adjustment. See gtk_scrolled_window_set_hadjustment(), gtk_scrolled_window_get_hadjustment().\r
+<para>
+Horizontal adjustment. See gtk_scrolled_window_set_hadjustment(), gtk_scrolled_window_get_hadjustment().
</para>
<!-- ##### ARG GtkScrolledWindow:vadjustment ##### -->
-<para>\r
-Vertical adjustment. See gtk_scrolled_window_set_vadjustment(), gtk_scrolled_window_get_vadjustment().\r
+<para>
+Vertical adjustment. See gtk_scrolled_window_set_vadjustment(), gtk_scrolled_window_get_vadjustment().
</para>
<!-- ##### ARG GtkScrolledWindow:hscrollbar-policy ##### -->
-<para>\r
-Horizontal scrollbar policy (show scrollbar always, never, or "when appropriate").\r
+<para>
+Horizontal scrollbar policy (show scrollbar always, never, or "when appropriate").
</para>
<!-- ##### ARG GtkScrolledWindow:vscrollbar-policy ##### -->
-<para>\r
-Vertical scrollbar policy (show scrollbar always, never, or "when appropriate").\r
+<para>
+Vertical scrollbar policy (show scrollbar always, never, or "when appropriate").
</para>
<!-- ##### ARG GtkScrolledWindow:window-placement ##### -->
-<para>\r
-Position of child window with respect to scrollbars; top left, top\r
-right, bottom left, bottom right.\r
+<para>
+Position of child window with respect to scrollbars; top left, top
+right, bottom left, bottom right.
</para>
<!-- ##### ARG GtkScrolledWindow:shadow-type ##### -->
<para>
-
+Type of frame drawn around the child of the scrolled window.
</para>
@second:
-<!-- ##### FUNCTION gtk_text_iter_spew ##### -->
-<para>
-
-</para>
-
-@iter:
-@desc:
-
-
_("Value between 0.0 and 1.0 to indicate X scale"),
0.0,
1.0,
- 0.5,
+ 0.0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (gobject_class,
PROP_YSCALE,
_("Value between 0.0 and 1.0 to indicate Y scale"),
0.0,
1.0,
- 0.5,
+ 0.0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
}
alignment->xalign = 0.5;
alignment->yalign = 0.5;
- alignment->xscale = 1.0;
- alignment->yscale = 1.0;
+ alignment->xscale = 0.0;
+ alignment->yscale = 0.0;
}
GtkWidget*
{
case PROP_XALIGN:
gtk_alignment_set (alignment,
- g_value_get_float(value),
+ g_value_get_float (value),
alignment->yalign,
alignment->xscale,
alignment->yscale);
case PROP_YALIGN:
gtk_alignment_set (alignment,
alignment->xalign,
- g_value_get_float(value),
+ g_value_get_float (value),
alignment->xscale,
alignment->yscale);
break;
gtk_alignment_set (alignment,
alignment->xalign,
alignment->yalign,
- g_value_get_float(value),
+ g_value_get_float (value),
alignment->yscale);
break;
case PROP_YSCALE:
alignment->xalign,
alignment->yalign,
alignment->xscale,
- g_value_get_float(value));
+ g_value_get_float (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
*/
#include <string.h>
+#include "gtkalignment.h"
#include "gtkbutton.h"
#include "gtklabel.h"
#include "gtkmain.h"
GtkWidget *label;
GtkWidget *image;
GtkWidget *hbox;
+ GtkWidget *align;
if (!button->constructed)
return;
gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (button));
image = gtk_image_new_from_stock (button->label_text, GTK_ICON_SIZE_BUTTON);
- hbox = gtk_hbox_new (FALSE, 1);
+ hbox = gtk_hbox_new (FALSE, 2);
+ align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
+
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- gtk_box_pack_end (GTK_BOX (hbox), label, TRUE, TRUE, 0);
+ gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_container_add (GTK_CONTAINER (button), hbox);
- gtk_widget_show_all (hbox);
+ gtk_container_add (GTK_CONTAINER (button), align);
+ gtk_container_add (GTK_CONTAINER (align), hbox);
+ gtk_widget_show_all (align);
return;
}
g_list_free (children);
}
+/**
+ * gtk_dialog_set_has_separator:
+ * @dialog: a #GtkDialog
+ * @setting: %TRUE to have a separator
+ *
+ * Sets whether the dialog has a separator above the buttons.
+ * %TRUE by default.
+ *
+ **/
void
gtk_dialog_set_has_separator (GtkDialog *dialog,
gboolean setting)
g_object_notify (G_OBJECT (dialog), "has_separator");
}
+/**
+ * gtk_dialog_get_has_separator:
+ * @dialog: a #GtkDialog
+ *
+ * Accessor for whether the dialog has a separator.
+ *
+ * Return value: %TRUE if the dialog has a separator
+ **/
gboolean
gtk_dialog_get_has_separator (GtkDialog *dialog)
{
/* Public interface
*/
+/**
+ * gtk_layout_new:
+ * @hadjustment: horizontal scroll adjustment, or %NULL
+ * @vadjustment: vertical scroll adjustment, or %NULL
+ *
+ * Creates a new #GtkLayout. Unless you have a specific adjustment
+ * you'd like the layout to use for scrolling, pass %NULL for
+ * @hadjustment and @vadjustment.
+ *
+ * Return value: a new #GtkLayout
+ **/
GtkWidget*
gtk_layout_new (GtkAdjustment *hadjustment,
return GTK_WIDGET (layout);
}
+/**
+ * gtk_layout_get_hadjustment:
+ * @layout: a #GtkLayout
+ *
+ * This function should only be called after the layout has been
+ * placed in a #GtkScrolledWindow or otherwise configured for
+ * scrolling. It returns the #GtkAdjustment used for communication
+ * between the horizontal scrollbar and @layout.
+ *
+ * See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
+ *
+ * Return value: horizontal scroll adjustment
+ **/
GtkAdjustment*
gtk_layout_get_hadjustment (GtkLayout *layout)
{
return layout->hadjustment;
}
+/**
+ * gtk_layout_get_vadjustment:
+ * @layout: a #GtkLayout
+ *
+ * This function should only be called after the layout has been
+ * placed in a #GtkScrolledWindow or otherwise configured for
+ * scrolling. It returns the #GtkAdjustment used for communication
+ * between the vertical scrollbar and @layout.
+ *
+ * See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
+ *
+ * Return value: vertical scroll adjustment
+ **/
GtkAdjustment*
gtk_layout_get_vadjustment (GtkLayout *layout)
{
G_OBJECT_CLASS (parent_class)->finalize (object);
}
+/**
+ * gtk_layout_set_hadjustment:
+ * @layout: a #GtkLayout
+ * @adjustment: new scroll adjustment
+ *
+ * Sets the horizontal scroll adjustment for the layout.
+ *
+ * See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
+ *
+ **/
void
gtk_layout_set_hadjustment (GtkLayout *layout,
GtkAdjustment *adjustment)
g_object_notify (G_OBJECT (layout), "hadjustment");
}
-
+/**
+ * gtk_layout_set_vadjustment:
+ * @layout: a #GtkLayout
+ * @adjustment: new scroll adjustment
+ *
+ * Sets the vertical scroll adjustment for the layout.
+ *
+ * See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
+ *
+ **/
void
gtk_layout_set_vadjustment (GtkLayout *layout,
GtkAdjustment *adjustment)
return NULL;
}
+/**
+ * gtk_layout_put:
+ * @layout: a #GtkLayout
+ * @child_widget: child widget
+ * @x: X position of child widget
+ * @y: Y position of child widget
+ *
+ * Adds @child_widget to @layout, at position (@x,@y).
+ * @layout becomes the new parent container of @child_widget.
+ *
+ **/
void
gtk_layout_put (GtkLayout *layout,
GtkWidget *child_widget,
gtk_widget_queue_resize (GTK_WIDGET (layout));
}
+/**
+ * gtk_layout_move:
+ * @layout: a #GtkLayout
+ * @child_widget: a current child of @layout
+ * @x: X position to move to
+ * @y: Y position to move to
+ *
+ * Moves a current child of @layout to a new position.
+ *
+ **/
void
gtk_layout_move (GtkLayout *layout,
GtkWidget *child_widget,
}
}
+/**
+ * gtk_layout_set_size:
+ * @layout: a #GtkLayout
+ * @width: width of entire scrollable area
+ * @height: height of entire scrollable area
+ *
+ * Sets the size of the scrollable area of the layout.
+ *
+ **/
void
gtk_layout_set_size (GtkLayout *layout,
guint width,
*height = layout->height;
}
+/**
+ * gtk_layout_freeze:
+ * @layout: a #GtkLayout
+ *
+ * This is a deprecated function, it doesn't do anything useful.
+ **/
void
gtk_layout_freeze (GtkLayout *layout)
{
layout->freeze_count++;
}
+/**
+ * gtk_layout_thaw:
+ * @layout: a #GtkLayout
+ *
+ * This is a deprecated function, it doesn't do anything useful.
+ **/
void
gtk_layout_thaw (GtkLayout *layout)
{
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
-
+
+ /*< public >*/
GdkWindow *bin_window;
+ /*< private >*/
GdkVisibilityState visibility;
gint scroll_x;
gint scroll_y;
GtkWidget* gtk_layout_new (GtkAdjustment *hadjustment,
GtkAdjustment *vadjustment);
void gtk_layout_put (GtkLayout *layout,
- GtkWidget *widget,
+ GtkWidget *child_widget,
gint x,
gint y);
void gtk_layout_move (GtkLayout *layout,
- GtkWidget *widget,
+ GtkWidget *child_widget,
gint x,
gint y);
return real->line_byte_offset;
}
+/**
+ * gtk_text_iter_get_visible_line_offset:
+ * @iter: a #GtkTextIter
+ *
+ * Returns the offset in characters from the start of the
+ * line to the given @iter, not counting characters that
+ * are invisible due to tags with the "invisible" flag
+ * toggled on.
+ *
+ * Return value: offset in visible characters from the start of the line
+ **/
gint
gtk_text_iter_get_visible_line_offset (const GtkTextIter *iter)
{
return vis_offset;
}
+
+/**
+ * gtk_text_iter_get_visible_line_index:
+ * @iter: a #GtkTextIter
+ *
+ * Returns the number of bytes from the start of the
+ * line to the given @iter, not counting bytes that
+ * are invisible due to tags with the "invisible" flag
+ * toggled on.
+ *
+ * Return value: byte index of @iter with respect to the start of the line
+ **/
gint
gtk_text_iter_get_visible_line_index (const GtkTextIter *iter)
{
return TRUE;
}
+
+/**
+ * gtk_text_iter_forward_lines:
+ * @iter: a #GtkTextIter
+ * @count: number of lines to move forward
+ *
+ * Moves @count lines forward, if possible (if @count would move
+ * past the start or end of the buffer, moves to the start or end of
+ * the buffer). The return value indicates whether the iterator moved
+ * onto a dereferenceable position; if the iterator didn't move, or
+ * moved onto the end iterator, then FALSE is returned. If @count is 0,
+ * the function does nothing and returns FALSE. If @count is negative,
+ * moves backward by 0 - @count lines.
+ *
+ * Return value: whether @iter moved and is dereferenceable
+ **/
gboolean
gtk_text_iter_forward_lines (GtkTextIter *iter, gint count)
{
}
}
+/**
+ * gtk_text_iter_backward_lines:
+ * @iter: a #GtkTextIter
+ * @count: number of lines to move backward
+ *
+ * Moves @count lines backward, if possible (if @count would move
+ * past the start or end of the buffer, moves to the start or end of
+ * the buffer). The return value indicates whether the iterator moved
+ * onto a dereferenceable position; if the iterator didn't move, or
+ * moved onto the end iterator, then FALSE is returned. If @count is 0,
+ * the function does nothing and returns FALSE. If @count is negative,
+ * moves forward by 0 - @count lines.
+ *
+ * Return value: whether @iter moved and is dereferenceable
+ **/
gboolean
gtk_text_iter_backward_lines (GtkTextIter *iter, gint count)
{
}
/**
- * gtk_text_iter_forward_word_end:
+ * gtk_text_iter_backward_word_start:
* @iter: a #GtkTextIter
*
* Moves backward to the next word start. (If @iter is currently on a
* @iter: a #GtkTextIter
* @count: number of sentences to move
*
- * Calls gtk_text_iter_forward_sentence_end() up to @count times.
+ * Calls gtk_text_iter_forward_sentence_end() @count times (or until
+ * gtk_text_iter_forward_sentence_end() returns %FALSE). If @count is
+ * negative, moves backward instead of forward.
*
* Return value: %TRUE if @iter moved and is not the end iterator
**/
}
/**
- * gtk_text_iter_forward_sentence_ends:
+ * gtk_text_iter_backward_sentence_starts:
* @iter: a #GtkTextIter
* @count: number of sentences to move
*
- * Calls gtk_text_iter_backward_sentence_start() up to @count times.
+ * Calls gtk_text_iter_backward_sentence_start() up to @count times,
+ * or until it returns %FALSE. If @count is negative, moves forward
+ * instead of backward.
*
* Return value: %TRUE if @iter moved and is not the end iterator
**/
check_invariants (iter);
}
-void
-gtk_text_iter_spew (const GtkTextIter *iter, const gchar *desc)
-{
- GtkTextRealIter *real = (GtkTextRealIter*)iter;
-
- g_return_if_fail (iter != NULL);
-
- if (real->chars_changed_stamp != _gtk_text_btree_get_chars_changed_stamp (real->tree))
- g_print (" %20s: <invalidated iterator>\n", desc);
- else
- {
- check_invariants (iter);
- g_print (" %20s: line %d / char %d / line char %d / line byte %d\n",
- desc,
- gtk_text_iter_get_line (iter),
- gtk_text_iter_get_offset (iter),
- gtk_text_iter_get_line_offset (iter),
- gtk_text_iter_get_line_index (iter));
- check_invariants (iter);
- }
-}
-
void
_gtk_text_iter_check (const GtkTextIter *iter)
{
void gtk_text_iter_order (GtkTextIter *first,
GtkTextIter *second);
-/* Debug */
-void gtk_text_iter_spew (const GtkTextIter *iter,
- const gchar *desc);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
#include <gtk/gtk.h>
#include "../gtk/gtktexttypes.h" /* Private header, for UNKNOWN_CHAR */
+static void
+gtk_text_iter_spew (const GtkTextIter *iter, const gchar *desc)
+{
+ g_print (" %20s: line %d / char %d / line char %d / line byte %d\n",
+ desc,
+ gtk_text_iter_get_line (iter),
+ gtk_text_iter_get_offset (iter),
+ gtk_text_iter_get_line_offset (iter),
+ gtk_text_iter_get_line_index (iter));
+}
+
static void fill_buffer (GtkTextBuffer *buffer);
static void run_tests (GtkTextBuffer *buffer);